<?php

declare(strict_types=1);

namespace App\Service;

use App\Repository\Article\ArticleTagRepository;
use Hyperf\Di\Annotation\Inject;
class ArticleTagService
{

    #[Inject]
    private ArticleTagRepository $articleTagRepository;


    /**
     * 批量写入文章标签
     * @param array $data
     * @return bool
     */
    public function batchInsertArticleTag(array $data): bool
    {
        return $this->articleTagRepository->batchInsert($data);
    }

    /**
     * 删除单篇文稿所有标签
     * @param int $id
     * @return bool
     */
    public function deleteArticleTags(int $id): bool
    {
        return $this->articleTagRepository->deleteTags($id);
    }
}